Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#1350] Escape chars in DotFileFormatSimple #1360

Merged

Conversation

Rascat
Copy link
Contributor

@Rascat Rascat commented Aug 14, 2019

  • introduce test which checks escaping for DotFileFormatSimple
  • reformat string declarations
  • remove DotFormat param from checkWriteOutput(). We dont need that since
    we escape chars for both formats

fixes #1350

- introduce test which checks escaping for DotFileFormatSimple
- reformat string declarations
- remove DotFormat param from checkWriteOutput(). We dont need that since
we escape chars for both formats

fixes dbs-leipzig#1350
- remove spurious semicolon
@galpha galpha added the bug label Aug 20, 2019
Copy link
Contributor

@galpha galpha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@ChrizZz110 ChrizZz110 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HTML encoding fits not here. Try to open a dot file with gephi and you will see that it can not interpret it as a quote. The right way is to encode each " with a " ... having this, gephi successfully imports the data and parses the escaped quote to a quote in the data explorer.

@Rascat
Copy link
Contributor Author

Rascat commented Aug 27, 2019

HTML encoding fits not here. Try to open a dot file with gephi and you will see that it can not interpret it as a quote. The right way is to encode each " with a " ... having this, gephi successfully imports the data and parses the escaped quote to a quote in the data explorer.

But then the question arises whether we should cater for a gephi specific problem. If i create a png using graphviz, the html escaped characters are properly rendered. Its just gephi who does not understand these sequences and takes all of the chars "as is" (at least thats what i'm seeing in the data view). I think we need to decide whether the simple format will primarily be used to render graphs in gephi or to render simpler graphics with graphviz.

@ChrizZz110
Copy link
Contributor

If i create a png using graphviz, the html escaped characters are properly rendered.

And the same for escaping a quote with a backslash (See image)
encoding_dot_example

Because this ecaping works with gephi and graphviz (please chack again with your examples), we should use this.

@ChrizZz110 ChrizZz110 added READY FOR MERGE Labels a PR as ready for merging. and removed NOT READY FOR MERGE labels Sep 3, 2019
@galpha galpha merged commit 9a357e7 into dbs-leipzig:develop Sep 4, 2019
galpha pushed a commit that referenced this pull request Oct 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug READY FOR MERGE Labels a PR as ready for merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug in Simple DOT Output Format when a string value has quotes
3 participants